#include <stdio.h>
#include <unistd.h>

int main()
{
    int fd[2];
    int ret = pipe(fd);
    if(ret<0){
        perror("pipe");
        return -1;
    }

#if 0
    char buf[1024] = {0};
    read(fd[0],buf,sizeof(buf)-1);
#endif

#if 1
    int count = 1;
    while(1){
        char buf[65536] = {'a','b','c','\0'};
        ssize_t w_size = write(fd[1],buf,65536);

        if(w_size<0){
            break;
        }
        count +=65536;
        printf("count:%d\n",count);
    }
#endif

    return 0;
}